//
//  WSMyLikeCell.m
//  CharonTVProject
//
//  Created by karong on 2023/8/14.
//

#import "WSMyLikeCell.h"
@interface WSMyLikeCell ()
@property (weak, nonatomic) IBOutlet UILabel *subTitleLabel;
@property (weak, nonatomic) IBOutlet UILabel *titleLabel;
@property (weak, nonatomic) IBOutlet UIButton *checkBox;
@property (weak, nonatomic) IBOutlet UIButton *totalViewButton;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *imageViewLeft;
@end

@implementation WSMyLikeCell

- (void)setDataWithObject:(WSVideo *)object isEdit:(BOOL)isEdit {
    [super setDataWithObject:object];
    self.titleLabel.text = object.tv_title;
    self.subTitleLabel.text = object.chapter_title;
    self.imageViewLeft.constant = isEdit?53:12;
    self.checkBox.hidden = !isEdit;
    self.checkBox.selected = object.isSelected;
    [self.totalViewButton setTitle:[NSString ws10Thousands1DecimalWithValue:object.play_num] forState:(UIControlStateNormal)];
    [self.totalViewButton setButtonImageTitleStyle:(WSButtonImageTitleStyleLeft) padding:3];
    [self uploadLayout];
}

@end
